import React from "react"
import classnames from "classnames"

const Checkbox = React.memo(props => (

  <div
    className={classnames(
      `vx-radio-con ${props.className || ''} ${props.color ? `vx-radio-${props.color}` : ''}`
    )}
  >
    <input
      type="checkbox"
      defaultChecked={props.defaultChecked}
      value={props.value}
      disabled={props.disabled}
      name={props.name}
      onClick={props.onClick}
      onChange={props.onChange}
      ref={props.ref}
      checked={props.checked}
    />
    <span
      className={classnames(`vx-radio ${props.iconClassName || ''}`, {
        "vx-radio-sm": props.size === "sm",
        "vx-radio-lg": props.size === "lg",
      })}
    >
          <span className="vx-radio--border" />
          <span className="vx-radio--circle" />
        </span>
    <span className={props.labelClassName}>{props.label}</span>
  </div>

))

export default Checkbox
